# -*- coding: utf-8 -*-
# @Author   : 白云酱
# Data      :
# Software  :pyChrom
# version   :python 3.10
# @File     :browser_operation.py

from selenium.webdriver import ActionChains
from libs.base_driver import BaseDriver


class BrowserOperation:
    def __init__(self, driver: BaseDriver):
        self.base = driver

    def send_keys(self, locator, text):
        """输入文本内容"""
        self.base.find_singular(locator).send_keys(text)

    def click(self,locator):
        """点击元素"""
        self.base.find_singular(locator).click()

    def get(self, url: str):
        self.base.driver.get(url)

